<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第14题</title>
    <script>
        var i = parseInt(prompt("请任意输入一个三位数","100"));
        var ge = i % 10,
            shi = parseInt(i / 10) % 10,
            bai = parseInt(i / 100),
            sum = ge + shi + bai;
        alert(sum);
    </script>
</head>
<body>
    
</body>
</html>